reading-notes

About Random Module

how to use:

Random functions

Randint If we wanted a random integer, we can use the randint function Randint accepts two parameters: a lowest and a highest number. Generate integers between 1,5. The first value should be less than the second.

import random

import random
random.random() * 100

choice

choice( ['red', 'black', 'green'] ).

The choice function can often be used for choosing a random element from a list.

from random import shuffle
x = [[i] for i in range(10)]
shuffle(x)
Randrange
Generate a randomly selected element from range(start, stop, step)

About Risk Analysis

  1. Use of new hardware

  2. Use of new technology

  3. Use of new automation tool

  4. The sequence of code

  5. Availability of test resources for the application

How to perform Risk Analysis?

  1. Searching the risk.
  2. Analyzing the impact of each individual risk.
  3. Measures for the risk identified.